/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.kkh.dao;


import com.hlingsoft.kkh.entity.AppUser;
import com.hlingsoft.kkh.entity.EventComments;

import com.hlingsoft.kkh.entity.vo.EventCommentsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
	public interface EventCommentsDao {

	/**
	 * 通过id获取eventcomments
	 * 
	 * @param eventId
	 * @return List<User>
	 */
	public List<EventComments> getCommentsListByEventId(@Param("eventId") long eventId);

	public List<EventComments> getCommentsListByEventIdWithNone(@Param("eventId") long eventId);




	/**
	 * 活动的评论数
	 * @param eventId
	 * @return
	 */
	public int getCommentsListByEventIdCount(@Param("eventId") long eventId);



	/**
	 * 通过eventsId获取带图片的comments
	 * @param eventId
	 * @return
	 */
	public List<EventComments> getImageCommentsListByEventId(@Param("eventId") long eventId,@Param("type") int type,@Param("offset")int offset,@Param("rows") int rows);

	/**
	 * 通过eventsId获取带没有图片的comments
	 * @param eventId
	 * @return
	 */
	public List<EventComments> getNoImageCommentsListByEventId(@Param("eventId") long eventId,@Param("offset") long offset,
															   @Param("rows") long rows);

	/**
	 *
	 * @param eventId
	 * @return
	 */
	public List<EventComments> getCommentsListByEventId1(@Param("eventId") long eventId);


	public long addEventComments(EventComments eventComments);

	public EventComments getCommentsListById(@Param("id") long id);

	public int updateEventComments(EventComments eventComments);

	public List<AppUser> getMoreEventComments();

	public List<EventCommentsVo> addEventCommentsVo();

	public List<EventComments> getCommentsListByAppUserId(@Param("appUserId") long appUserId);

	public List<EventComments> getCommentsListByAppUserIdWithNone(@Param("appUserId") long appUserId);

	public long getCommentsListByAppUserIdCount(@Param("appUserId") long appUserId);


	/**
	 * 获取user最新发布                            `
	 * @param appUserId
	 * @return
	 */
	public EventComments getNewestByAppUserId(@Param("appUserId") long appUserId);

	/**
	 * 获取第一个  eventComments
	 * @param eventId
	 * @return
	 */
	public  EventComments getFirstEventComments(@Param("eventId") long eventId);

	/**
	 * 获取最新的eventComments
	 * @return
	 */
		public List<EventComments> getNewestEventComments(@Param("offset") long offset,
												@Param("rows") long rows);


	public List<EventComments> getCommentsListByEventId2(@Param("eventId") long eventId);

	/**
	 * 获取所有的评论
	 * @return
	 */
	public List<EventComments>  getAll();


	public  EventComments getFirstEventCommentsWithNone(@Param("eventId") long eventId);


	public EventComments getCommentsListByIdWithNone(@Param("id") long id);

}
